#include<stdio.h>
int main()
{
 
int comp_char(const void* p1, const void* p2)
{
	return *(char*)p1 - *(char*)p2;
}
 
 
int main()
{
	char arr[] = { 'a','b','g','s','d','t' };
	int num = sizeof(arr) / sizeof(arr[0]);
 
	qsort(arr, num, sizeof(arr[0]), comp_char);
    for (int i = 0; i < num; i++)
	{
		printf("%c ", arr[i]);
	}
	return 0;
}
}
